<?php

namespace Database\Factories;


use App\Models\SystemAttachment;
use Illuminate\Database\Eloquent\Factories\Factory;

class SystemAttachmentFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = SystemAttachment::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'user_id' => $this->faker->numberBetween(1,50),
            'name' => $this->faker->name . '.jpg',
            'category_id' => $this->faker->numberBetween(1,10),
            'hash' => $this->faker->uuid,
            'att_dir' => $this->faker->filePath(),
            'size' => $this->faker->numberBetween(1000,2000),
            'type' => $this->faker->randomElement([
               'jpg',
               'png',
               'jpeg',
               'gif'
            ]),
            'upload_type' => $this->faker->randomElement([
                'oss',
                'cos',
                'kodo',
                'local'
            ]),
            'module_type' => $this->faker->randomElement([
                'user',
                'admin'
            ]),
            'original_name' => $this->faker->name . 'jpg',
        ];
    }
}


